package DBLayer;
import ModelLayer.SalesOrder;
import java.util.ArrayList;

public interface IFDBSalesOrder
{
	//find all orders
	public ArrayList<SalesOrder> getAllSalesOrders(boolean retrieveAssociation);
	
	//find all orders for a customer
	public ArrayList<SalesOrder> getCustomerSalesOrders(int customerId, boolean retrieveAssociation);
	
	//find order by id
	public SalesOrder getSalesOrdersByID(int orderId, boolean retrieveAssociation);
	
	//find orders by orderDate
	public ArrayList<SalesOrder> getSalesOrdersByOrderDate(String orderDate, boolean retrieveAssociation);
	
	//find orders by deliveryStatus
	public ArrayList<SalesOrder> getSalesOrdersByDeliveryStatus(String deliveryStatus, boolean retrieveAssociation);
	
	//find orders by deliveryDate
	public ArrayList<SalesOrder> getSalesOrdersByDeliveryDate(String deliveryDate, boolean retrieveAssociation);
	
	//find orders for an invoice
	public ArrayList<SalesOrder> getSalesOrdersInInvoice(int invoiceNo, boolean retrieveAssociation);
	
	//insert SalesOrder in the database 
	public int insertSalesOrder(SalesOrder order) throws Exception;
	
	//update SalesOrder 
	public int updateSalesOrder(SalesOrder order);
	
	//delete SalesOrder
	public int deleteSalesOrder(int orderId);
}